#ifndef CHARACTER
#define CHARACTER

#include <vector>
#include <SFML/Graphics.hpp>
#include <iostream>
#include "Map.hpp"
#include "Gun.hpp"
#include "cDAT.h"

class Character
{
private:
    int x;
    int y;
    int life;
    int reloading; // Si >0 : en train de recharger
    float speed;
    sf::Sprite sprite, gunSprite;
    sf::Texture texture;
    sf::Texture gunTexture;
    sf::Image image, gunImage;
    Gun *gun;
    RectangleShape ligne;

public:
    Character(int x, int y);
    bool move(int x, int y, Map &map);
    bool collisionDecor(int x, int y,Map &map);
    bool enterExit(int depX, int depY,Map &map);
//    bool collisionZombie(vector<Zombie> &zombie);
    void touchedByZombie(int degat);
    void reload();
    void die();

    int getX();
    int getY();
    void setX(int x);
    void setY(int y);
    int getLife();
    int getReloading();
    void setReloading(int time);
    float getSpeed();
    sf::Sprite getSprite();
    Gun* getGun();
    RectangleShape& getLigne();
    Sprite& getGunSprite();

};
#endif
